dict_a = {'a': 100, 'b': 200, 'c': 300}
dict_b = {'a': 200, 'b': 150, 'd': 400}
for j in dict_a.keys():
   for i in dict_b.keys():
       print(j,i)
#字典的键按照对应值的字典序排序，并返回排序后的键列表。
my_dict = {'apple': 2, 'banana': 3, 'cherry': 1}
#print(sort_dict_by_value(my_dict))  #
# 输出: ['cherry', 'apple', 'banana']
sort_dict_by_value = []
for i,j in my_dict.items():
   sort_dict_by_value.append(j)
   sorted_list = sorted(sort_dict_by_value)
print(sorted_list)
